package com.niit;

import com.niit.entity.Student;
import com.niit.mapper.StudentMapper;
import com.niit.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class TestResultMap {
    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtil.getSqlSession();
        StudentMapper studentMapper = sqlSession.getMapper(StudentMapper.class);

        List<Student> students = studentMapper.getUsersUsingResultMap();
        for (Student student : students) {
            System.out.println(student.toString());
        }
    }
}
